﻿using Microsoft.Practices.Prism.Modularity;
using Microsoft.Practices.Unity;

namespace EconomicInformationServiceWcf
{
    public class ServiceRigistrationModule : IModule
    {
        private readonly IUnityContainer _container;
        
        public ServiceRigistrationModule(IUnityContainer container)
        {
            _container = container;
        }

        public void Initialize()
        {
            _container.RegisterType<ISecurityService, SecurityService>(new ContainerControlledLifetimeManager());
            _container.RegisterType<IEconomicInformationService, EconomicInformationService>(new ContainerControlledLifetimeManager());
            _container.RegisterType<IUserSettingsService, UserSettingsService>(new ContainerControlledLifetimeManager());
            _container.RegisterType<INewsInformationService, NewsInformationService>(new ContainerControlledLifetimeManager());
        }
    }
}